package cn.gok.io;

import java.io.*;

/**
 * @ClassName 缓冲流
 * @Description TODO
 * @Author HP
 * @Date 17:09 2022/7/7
 * @Version 1.0
 **/
public class 缓冲流 {
    public 缓冲流() throws FileNotFoundException {
    }

    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();

        BufferedReader bufferedReader = new BufferedReader(new FileReader("D:\\workspace_idea\\javase_project\\day4\\src\\cn\\gok\\io\\a1.txt"));
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("D:\\workspace_idea\\javase_project\\day4\\src\\cn\\gok\\io\\a2.txt"));

        String line = "";
        while((line=bufferedReader.readLine())!=null){
            bufferedWriter.write(line);
            bufferedWriter.newLine();
        }
        bufferedWriter.close();
        bufferedReader.close();
        long stop = System.currentTimeMillis();
        long time = (stop-start)/1000;
        System.out.println(time);
     }


     BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:\\workspace_idea\\javase_project\\day4\\src\\cn\\gok\\io\\a1.txt"));
    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("D:\\workspace_idea\\javase_project\\day4\\src\\cn\\gok\\io\\a2.txt"));
    byte b2[] = new byte[100];

}
